package com.music.muisc.services;


import com.music.muisc.dao.UnitRepository;
import com.music.muisc.entity.Unit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UnitService {

    @Autowired
    UnitRepository unitRepository;

    public Unit save(Unit unit){
        return unitRepository.save(unit);
    }

    public List<Unit> getAll(){
        return unitRepository.findAll();
    }
}
